home *** CD-ROM | disk | FTP | other *** search
- global knummaxalbumphotos, kalbumeditorthumbnailsprnumbgn, kalbumeditorinsertareasprnumbgn, gcurphotoorder, galbumphotoorder, gcurphotonum
-
- on updatealbumeditorthumbnail
- busycurs()
- repeat with aphotocount = 1 to knummaxalbumphotos
- set athumbnailsprnum to kalbumeditorthumbnailsprnumbgn + aphotocount - 1
- sendSprite(athumbnailsprnum, #mresetphotonum)
- sendSprite(athumbnailsprnum, #mupdatethumbnailview)
- end repeat
- set anumalbumphoto to count(galbumphotoorder)
- repeat with aphotocount = 1 to anumalbumphoto
- set athumbnailsprnum to kalbumeditorthumbnailsprnumbgn + aphotocount - 1
- sendSprite(athumbnailsprnum, #msetphotonum, getAt(galbumphotoorder, aphotocount))
- sendSprite(athumbnailsprnum, #mupdatethumbnailview)
- end repeat
- updateStage()
- resetcurs()
- end
-
- on swapalbumphotoorder vphotoindex1, vphotoindex2
- if (vphotoindex1 > count(galbumphotoorder)) or (vphotoindex2 > count(galbumphotoorder)) then
- insertalbumphotoorder(vphotoindex1, vphotoindex2)
- else
- set galbumphotoorder to swapitem(galbumphotoorder, vphotoindex1, vphotoindex2)
- set gcurphotoorder to galbumphotoorder
- updatealbumeditorthumbnail()
- setcurphotonum(vphotoindex1)
- end if
- end
-
- on insertalbumphotoorder vinsertpos, vphotoindex
- if vinsertpos > count(galbumphotoorder) then
- set vinsertpos to count(galbumphotoorder) + 1
- end if
- if vinsertpos = vphotoindex then
- exit
- end if
- if vinsertpos < vphotoindex then
- set galbumphotoorder to insertitem(galbumphotoorder, vinsertpos, getAt(galbumphotoorder, vphotoindex))
- deleteAt(galbumphotoorder, vphotoindex + 1)
- set gcurphotoorder to galbumphotoorder
- setcurphotonum(vinsertpos)
- else
- set galbumphotoorder to insertitem(galbumphotoorder, vinsertpos, getAt(galbumphotoorder, vphotoindex))
- deleteAt(galbumphotoorder, vphotoindex)
- set gcurphotoorder to galbumphotoorder
- setcurphotonum(vinsertpos - 1)
- end if
- updatealbumeditorthumbnail()
- end
-
- on deletealbumphotoorder vphotoindex
- deleteAt(galbumphotoorder, vphotoindex)
- set gcurphotoorder to galbumphotoorder
- set anewphotoindex to cropvalue(vphotoindex, 1, count(galbumphotoorder))
- setcurphotonum(anewphotoindex)
- updatealbumeditorthumbnail()
- end
-
- on allclearalbumphotoorder
- playclicksnd()
- set galbumphotoorder to []
- set gcurphotoorder to []
- setcurphotonum(0)
- updatealbumeditorthumbnail()
- unLoad()
- end
-
- on exitalbumeditorclickreaction
- playclicksnd()
- go("album")
- updatephotoview()
- unLoad()
- end
-